<?php get_header(); ?>
	<div class='container'>
        <div class="sidebar"><?php include (TEMPLATEPATH."/sidebar.php");?></div>
        <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
        <div class="content">
            <h2 class="taxonomy-title">Danh sách sản phẩm <?php echo $term->name?></h2>
            <?php $args = array( 'post_type' => 'san-pham','loai-san-pham'=>$term->slug);
            $loop = new WP_Query( $args );
            ?>
            <?php $count=1;?>
            <div class="taxonomy-thumnail">
                <ul>
                    <?php if (have_posts()) : ?>
                        <?php while ($loop->have_posts()) : $loop->the_post(); ?>
                        <?php
                            if($count%2!=0)
                                echo "<li>";
                            else
                                echo "<li style='margin-right: 0px'>";

                        ?>
                        <?php $count++;?>
                            <div class="post type-post entry">
                                <h2 class="entry-title" style="font-size: 14px;margin-bottom: 10px">
                                    <a href="<?php echo get_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark">
                                        <?php the_title(); ?>
                                    </a>
                                </h2>
                            <div class="entry-summary">
                                <a href="<?php echo get_permalink()?>" title="<?php the_title();?>">
                                    <?php
                                    if ( has_post_thumbnail() ) {
                                        the_post_thumbnail( 'thumbnail' ,array(200,200));
                                    }
									
                                    ?>
                                </a>
								
                            </div><!-- .entry-summary -->
                        </div>
                        <?php echo "</li>"?>
                        <?php endwhile; ?>

                    <?php endif; ?>
					
                </ul>
            </div>
        </div>
    </div>
<?php get_footer(); ?>